package com.feihong.txgw.inter.contract.product;

import com.feihong.txgw.model.bean.searchList.SearchListEntity;
import com.feihong.txgw.model.bean.searchList.SearchPhoneListModel;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseActivity;

import java.util.List;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName IProSearchContract
 * @package com.feihong.txgw.inter.contract.product
 * @data 2018/5/8 11:05
 * @Describe
 * @Change
 */
public interface IProSearchContract {

    interface IProSearchMainView extends IBaseActivity{

        /**
         *
         * @param searchListEntity 返回的数据
         * @param interceptor 是否拦截上啦加载
         */
        void getDataResult(List<SearchListEntity> searchListEntity,boolean interceptor);

        void noData();
    }

    interface IProSearchMainModel extends IBaseModel{

        Observable<SearchPhoneListModel> getGoodsData(String lat,String lng,String keyWord,String searchType,int pageNum);

    }

    abstract class AbProSearchMainPrecenter extends AbBasePrecenter<IProSearchMainModel,IProSearchMainView>{

        public abstract void getGoodsData(String lat,String lng,String keyWord);

        /**
         * 获取第一页数据
         * @param lat
         * @param lng
         * @param keyWord
         */
        public abstract void getGoodsForFirst(String lat,String lng,String keyWord);
    }
}
